#!/bin/bash

INPUT="${TRAIN_FILE}"
OUTPUT="${MODEL_DIR}/stage2-weights"

${JAMR_HOME}/run AMRParser \
    --stage2-train \
    --stage1-concept-table "${MODEL_DIR}/conceptTable.train" \
    --dependencies "${INPUT}.snt.deps" \
    --tok "${INPUT}.snt.tok" \
    --snt "${INPUT}.snt" \
    --ner "${INPUT}.snt.IllinoisNER" \
    --srl "${INPUT}.snt.srl" \
    --training-dev "${DEV_FILE}" \
    --training-output "${OUTPUT}" \
    --smatch-eval "${SMATCH}" \
    -v 0 \
    --output-format "triples" \
    ${PARSER_OPTIONS} \
    ${RELATION_ID_TRAINING_OPTIONS} \
    < "${INPUT}.aligned.no_opN" \
    > "${OUTPUT}" \
    2> "${OUTPUT}.err"
